// components/search/search.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    routerPath: String,
    disabled: Boolean,
    isSearchClick: Boolean
  },

  /**
   * 组件的初始数据
   */
  data: {
    value: "",
  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleSearchChange(e) {
      this.triggerEvent('searchChange', { value: e.detail })
    },
    handleRouterSearch() {
      console.log('this.isSearchClick:', this.properties.isSearchClick)
      if (this.properties.isSearchClick) {
        wx.navigateTo({
          url: '/pages/search/index',
        })
      }
    }
  }
})
